module.exports = async function (notesLabels) {  
    const calendarNotes = await api.runOnBackend((notesLabel) => {
        const notes = api.getNotesWithLabel(notesLabel)[0];
        const events = []; // 存储所有事件 { id, title, start, end }
        for (const cNote of notes.getChildNotes()) {
            const id = cNote.noteId;
            const title = cNote.title;
            const start = cNote.getLabelValue("startDate");
            const end = cNote.getLabelValue("endDate");
        // 添加新事件
            events.push({
                id,
                title,
                start,
                end
            });
          };
        return events;
    },[notesLabels]);
    return JSON.stringify(calendarNotes);
}